import type { Commodity } from '@/types/commodity'
import { defineStore } from 'pinia'
import { ref } from 'vue'

export const useCategoryStore = defineStore('category', () => {
  // 商品分类信息
  const categoryDataList = ref<Commodity[]>([])
  // 设置商品分类信息
  const setCategoryDataList = (data: Commodity[]) => {
    categoryDataList.value = data
  }
  return { categoryDataList, setCategoryDataList }
})
